home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / wemdemo4.zip / INFO / ELISP.22 < prev    next >
Text File  |  1994-09-21  |  51KB  |  1,220 lines

  1. Info file elisp, produced by Makeinfo, -*- Text -*- from input file
  2. elisp.texi.
  3.  
  4.    This file documents GNU Emacs Lisp.
  5.  
  6.    This is edition 1.03 of the GNU Emacs Lisp Reference Manual,   for
  7. Emacs Version 18.
  8.  
  9.    Published by the Free Software Foundation, 675 Massachusetts
  10. Avenue,  Cambridge, MA 02139 USA
  11.  
  12.    Copyright (C) 1990 Free Software Foundation, Inc.
  13.  
  14.    Permission is granted to make and distribute verbatim copies of
  15. this manual provided the copyright notice and this permission notice
  16. are preserved on all copies.
  17.  
  18.    Permission is granted to copy and distribute modified versions of
  19. this manual under the conditions for verbatim copying, provided that
  20. the entire resulting derived work is distributed under the terms of a
  21. permission notice identical to this one.
  22.  
  23.    Permission is granted to copy and distribute translations of this
  24. manual into another language, under the above conditions for modified
  25. versions, except that this permission notice may be stated in a
  26. translation approved by the Foundation.
  27.  
  28.  
  29. 
  30. File: elisp,  Node: Terminal Input,  Next: Terminal Output,  Prev: System Environment,  Up: System Interface
  31.  
  32. Terminal Input
  33. ==============
  34.  
  35.    The terminal input functions and variables keep track of or
  36. manipulate terminal input.
  37.  
  38.    See *Note Emacs Display::, for related functions.
  39.  
  40.  * Function: recent-keys
  41.      This function returns a string comprising the last 100
  42.      characters read from the terminal.  These are the last 100
  43.      characters read by Emacs, no exceptions.
  44.  
  45.           (recent-keys)
  46.           => "erminal.  These are the last 100 characters read by Emacs, no
  47.           exceptions.
  48.           
  49.           @example
  50.           (recent-keys)^U^X^E"
  51.  
  52.      Here the string `@example' is a Texinfo command that was
  53.      inserted in the source file for the manual, and `^U^X^E' are the
  54.      characters that were typed to evaluate the expression
  55.      `(recent-keys)'.
  56.  
  57.  * Command: open-dribble-file FILENAME
  58.      This function opens a "dribble file" named FILENAME.  When a
  59.      dribble file is open, Emacs copies all keyboard input characters
  60.      to that file.  (The contents of keyboard macros are not typed on
  61.      the keyboard so they are not copied to the dribble file.)
  62.  
  63.      You close the dribble file by calling this function with an
  64.      argument of `""'.  The function always returns `nil'.
  65.  
  66.      This function is normally used to record the input necessary to
  67.      trigger an Emacs bug, for the sake of a bug report.
  68.  
  69.           (open-dribble-file "$j/dribble")
  70.                => nil
  71.  
  72.    See also the `open-termscript' function (*note Terminal Output::.).
  73.  
  74.  * Function: set-input-mode INTERRUPT FLOW QUIT-CHAR
  75.      This function sets the mode for reading keyboard input.  If
  76.      INTERRUPT is non-null, then Emacs uses input interrupts.  If it
  77.      is `nil', then it uses CBREAK mode.
  78.  
  79.      If FLOW is non-`nil', then Emacs uses XON/XOFF (`C-q', `C-s')
  80.      flow control for output to terminal.  This has no effect except
  81.      in CBREAK mode.  *Note Flow Control::.
  82.  
  83.      The normal setting is system dependent.  Some systems always use
  84.      CBREAK mode regardless of what is specified.
  85.  
  86.      If QUIT-CHAR is non-`nil', it specifies the character to use for
  87.      quitting.  Normally this is 7, the code for `C-g'.  *Note
  88.      Quitting::.
  89.  
  90.  * Variable: meta-flag
  91.      This variable tells Emacs whether to treat the 0200 bit in
  92.      keyboard input as the Meta bit.  `nil' means no, and anything
  93.      else means yes.  In version 19, `meta-flag' will be a function
  94.      instead of a variable.
  95.  
  96.  * Variable: keyboard-translate-table
  97.      This variable defines the translate table for keyboard input. 
  98.      This allows the user to redefine the keys on the keyboard
  99.      without changing any command bindings.  Its value must be a
  100.      string or `nil'.
  101.  
  102.      If `keyboard-translate-table' is a string, then each character
  103.      read from the keyboard is looked up in this string and the
  104.      character in the string is used instead.  If the string is of
  105.      length N, character codes N and up are untranslated.
  106.  
  107.      In the example below, `keyboard-translate-table' is set to a
  108.      string of 128 characters.  Then the characters `C-s' and `C-\'
  109.      are swapped and the characters `C-q' and `C-^' are swapped. 
  110.      After executing this function, typing `C-\' has all the usual
  111.      effects of typing `C-s', and vice versa.  (*Note Flow Control::
  112.      for more information on this subject.)
  113.  
  114.           (defun evade-flow-control ()
  115.             "Replace C-s with C-\ and C-q with C-^."
  116.             (interactive)
  117.             (let ((the-table (make-string 128 0)))
  118.               (let ((i 0))
  119.                 (while (< i 128)
  120.                   (aset the-table i i)
  121.                   (setq i (1+ i))))
  122.           
  123.               ;; Swap `C-s' and `C-\'.
  124.               (aset the-table ?\034 ?\^s)
  125.               (aset the-table ?\^s ?\034)
  126.               ;; Swap `C-q' and `C-^'.
  127.               (aset the-table ?\036 ?\^q)
  128.               (aset the-table ?\^q ?\036)
  129.           
  130.               (setq keyboard-translate-table the-table)))
  131.  
  132.      Note that this translation is the first thing that happens after
  133.      a character is read from the terminal.  As a result,
  134.      record-keeping features such as `recent-keys' and
  135.      `open-dribble-file' record the translated characters.
  136.  
  137.  
  138. 
  139. File: elisp,  Node: Terminal Output,  Next: Flow Control,  Prev: Terminal Input,  Up: System Interface
  140.  
  141. Terminal Output
  142. ===============
  143.  
  144.    The terminal output functions send or keep track of output sent
  145. from the computer to the terminal.  The `baud-rate' function tells
  146. you what Emacs thinks is the output baud rate of the terminal.
  147.  
  148.  * Function: baud-rate
  149.      This function returns the output baud rate of the terminal.
  150.  
  151.           (baud-rate)
  152.                => 9600
  153.  
  154.      If you are running across a network, and different parts of the
  155.      network work at different baud rates, the value returned by
  156.      Emacs may be different from the value used by your local
  157.      terminal.  Some network protocols communicate the local terminal
  158.      speed to the remote machine, so that Emacs and other programs
  159.      can get the proper value, but others do not.  If the machine
  160.      where Emacs is running has the wrong speed setting, you can
  161.      specify the right speed using the `stty' program.  However, you
  162.      will have to start Emacs afresh to make this take effect.
  163.  
  164.      *Note:* In version 19, `baud-rate' is a variable so that you can
  165.      change it conveniently within Emacs.
  166.  
  167.  * Function: send-string-to-terminal STRING
  168.      This function sends STRING to the terminal without alteration. 
  169.      Control characters in STRING will have terminal-dependent effects.
  170.  
  171.      One use of this function is to define function keys on terminals
  172.      that have downloadable function key definitions.  For example,
  173.      this is how on certain terminals to define function key 4 to
  174.      move forward four characters (by transmitting the characters
  175.      `C-u C-f' to the computer):
  176.  
  177.           (send-string-to-terminal "\eF4\^U\^F")
  178.                => nil
  179.  
  180.  * Command: open-termscript FILENAME
  181.      This function is used to open a "termscript file" that will
  182.      record all the characters sent by Emacs to the terminal.  It
  183.      returns `nil'.  Termscript files are useful for investigating
  184.      problems where Emacs garbles the screen, problems which are due
  185.      to incorrect termcap entries or to undesirable settings of
  186.      terminal options more often than actual Emacs bugs.  Once you
  187.      are certain which characters were actually output, you can
  188.      determine reliably whether they correspond to the termcap
  189.      specifications in use.
  190.  
  191.      See also `open-dribble-file' in *Note Terminal Input::.
  192.  
  193.           (open-termscript "../junk/termscript")
  194.                => nil
  195.  
  196.  
  197. 
  198. File: elisp,  Node: Flow Control,  Next: Batch Mode,  Prev: Terminal Output,  Up: System Interface
  199.  
  200. Flow Control
  201. ============
  202.  
  203.    This section attempts to answer the question "Why does Emacs
  204. choose to use flow-control characters in its command character set?" 
  205. For a second view on this issue, read the comments on flow control in
  206. the `emacs/INSTALL' file from the distribution; for help with
  207. termcaps and DEC terminal concentrators, see `emacs/etc/TERMS'.
  208.  
  209.    At one time, most terminals did not need flow control.  This meant
  210. that the choice of `C-s' and `C-q' as command characters was
  211. reasonable.  Emacs, for economy of keystrokes and portability, chose
  212. to use the control characters in the ASCII character set, and tried
  213. to make the assignments mnemonic (thus, `C-s' for search and `C-q'
  214. for quote).
  215.  
  216.    Later, some terminals were introduced which used these characters
  217. for flow control.  They were not very good terminals, so Emacs
  218. maintainers did not pay attention.  In later years, the practice
  219. became widespread among terminals, but by this time it was usually an
  220. option.  And the majority of users, who can turn flow control off,
  221. were unwilling to switch to less mnemonic key bindings for the sake
  222. of flow control.
  223.  
  224.    So which usage is "right", Emacs's or that of some terminal and
  225. concentrator manufacturers?  This is a rhetorical (or religious)
  226. question; it has no simple answer.
  227.  
  228.    One reason why we are reluctant to cater to the problems caused by
  229. `C-s' and `C-q' is that they are gratuitous.  There are other
  230. techniques (albeit less common in practice) for flow control that
  231. preserve transparency of the character stream.  Note also that their
  232. use for flow control is not an official standard.  Interestingly, on
  233. the model 33 teletype with a paper tape punch (which is very old),
  234. `C-s' and `C-q' were sent by the computer to turn the punch on and off!
  235.  
  236.    GNU Emacs (version 18.48 and later) provides several options for
  237. coping with terminals or front-ends that insist on using flow control
  238. characters.  Listed in estimated order of preference, these options
  239. are as follows:
  240.  
  241.   1. Have Emacs run in CBREAK mode with the kernel handling flow
  242.      control.  Issue `(set-input-mode nil t)' from `.emacs'.  After
  243.      doing this, it is necessary to find other keys to bind to the
  244.      commands `isearch-forward' and `quoted-insert'.  The usual
  245.      nominees are `C-^' and `C-\'.  There are two ways to get this
  246.      effect:
  247.  
  248.        1. Use the `keyboard-translate-table' to cause `C-^' and `C-\'
  249.           to be received by Emacs as though `C-s' and `C-q' were
  250.           typed.  Emacs (except at its very lowest level) never knows
  251.           that the characters typed were anything but `C-s' and
  252.           `C-q', so the use of these keys inside `isearch-forward'
  253.           still works--typing `C-^' while incremental searching will
  254.           move the cursor to the next match, etc.  For example:
  255.  
  256.                (setq keyboard-translate-table (make-string 128 0))
  257.                (let ((i 0))
  258.                  (while (< i 128)
  259.                    (aset keyboard-translate-table i i)
  260.                    (setq i (1+ i))))
  261.                
  262.                  ;; Swap `C-s' and `C-\'.
  263.                  (aset the-table ?\034 ?\^s)
  264.                  (aset the-table ?\^s ?\034)
  265.                  ;; Swap `C-q' and `C-^'.
  266.                  (aset the-table ?\036 ?\^q)
  267.                  (aset the-table ?\^q ?\036)))
  268.  
  269.        2. Simply rebind the keys `C-^' and `C-\' to `isearch-forward'
  270.           and `quoted-insert'.  To use the new keys to repeat
  271.           searches, it is necessary to set `search-repeat-char' to
  272.           `C-^' as well.
  273.  
  274.   2. Don't use CBREAK mode, but cause `C-s' and `C-q' to be bound to
  275.      a null command.  The problem with this solution is that the flow
  276.      control characters were probably sent because whatever sent them
  277.      is falling behind on the characters being sent to it.  The
  278.      characters that find their way to the terminal screen will not
  279.      in general be those that are intended.  Also, it will be be
  280.      necessary to find other keys to bind to `isearch-forward' and
  281.      `quoted-insert'; see the previous alternative.
  282.  
  283.         Here is a suitable null command:
  284.  
  285.           (defun noop ()
  286.             "Do nothing; return nil."
  287.             (interactive))
  288.  
  289.   3. Don't use CBREAK mode, and unset the `C-s' and `C-q' keys with
  290.      the `global-unset-key' function.  This is similar to the
  291.      previous alternative, except that the flow control characters
  292.      will probably cause beeps or visible bells.
  293.  
  294.         Note that if the terminal is the source of the flow control
  295.      characters and kernel flow control handling is enabled, you
  296.      probably will not have to send padding characters as specified
  297.      in a termcap or terminfo entry.  In this case, it may be
  298.      possible to customize a termcap entry to provide better Emacs
  299.      performance on the assumption that flow control is in use.  This
  300.      effect can also be simulated by announcing (with `stty' or its
  301.      equivalent) that the terminal is running at a very slow speed,
  302.      provided you are communicating across a network so that `stty'
  303.      does not actually try to change the line speed.
  304.  
  305.  
  306. 
  307. File: elisp,  Node: Batch Mode,  Prev: Flow Control,  Up: System Interface
  308.  
  309. Batch Mode
  310. ==========
  311.  
  312.    The command line option `-batch' causes Emacs to run
  313. noninteractively.  In this mode, Emacs does not read commands from
  314. the terminal, it does not alter the terminal modes, and it does not
  315. expect to be outputting to an erasable screen.  The idea is that you
  316. will specify Lisp programs to run; when they are finished, Emacs
  317. should exit.  The way to specify the programs to run is with `-l
  318. FILE', which causes the library named FILE to be loaded, and `-f
  319. FUNCTION', which causes FUNCTION to be called with no arguments.
  320.  
  321.    Any Lisp program output that would normally go to the echo area,
  322. either using `message' or using `prin1', etc., with `t' as the
  323. stream, will actually go to Emacs's standard output descriptor when
  324. in batch mode.  Thus, Emacs behaves much like a noninteractive
  325. application program.  (The echo area output that Emacs itself
  326. normally generates, such as command echoing, is suppressed entirely.)
  327.  
  328.  * Variable: noninteractive
  329.      This variable is non-`nil' when Emacs is running in batch mode.
  330.  
  331.  
  332. 
  333. File: elisp,  Node: Emacs Display,  Next: Tips,  Prev: System Interface,  Up: Top
  334.  
  335. Emacs Display
  336. *************
  337.  
  338.    This chapter describes a number of features related to the display
  339. that Emacs presents to the user.
  340.  
  341. * Menu:
  342.  
  343. * Refresh Screen::      Clearing the screen and redrawing everything on it.
  344. * Screen Attributes::   How big is the Emacs screen.
  345. * Truncation::          Folding or wrapping long text lines.
  346. * The Echo Area::       Where messages are displayed.
  347. * Selective Display::   Hiding part of the buffer text.
  348. * Overlay Arrow::       Display of an arrow to indicate position.
  349. * Temporary Displays::  Displays that go away automatically.
  350. * Waiting::             Forcing display update and waiting for user.
  351. * Blinking::            How Emacs shows the matching open parenthesis.
  352. * Control Char Display::  How control characters are displayed.
  353. * Beeping::             Audible signal to the user.
  354. * Window Systems::      Which window system is being used.
  355.  
  356.  
  357. 
  358. File: elisp,  Node: Refresh Screen,  Next: Screen Attributes,  Prev: Emacs Display,  Up: Emacs Display
  359.  
  360. Refreshing the Screen
  361. =====================
  362.  
  363.  * Command: redraw-display
  364.      This function clears the screen and redraws what is supposed to
  365.      appear on it.
  366.  
  367.  
  368. 
  369. File: elisp,  Node: Screen Attributes,  Next: Truncation,  Prev: Refresh Screen,  Up: Emacs Display
  370.  
  371. Screen Attributes
  372. =================
  373.  
  374.    The screen attribute functions describe and define the
  375. characteristics of the terminal.
  376.  
  377.  * Function: screen-height
  378.      This function returns the number of lines on the screen that are
  379.      available for display.
  380.  
  381.           (screen-height)
  382.                => 50
  383.  
  384.  * Function: screen-width
  385.      This function returns the number of columns on the screen that
  386.      are available for display.
  387.  
  388.           (screen-width)
  389.                => 80
  390.  
  391.  * Function: set-screen-height LINES &optional NOT-ACTUAL-SIZE
  392.      This function declares that the terminal can display LINES lines.
  393.      The sizes of existing windows will be altered proportionally to
  394.      fit.
  395.  
  396.      If NOT-ACTUAL-SIZE is non-`nil', then Emacs will display LINES
  397.      lines of output, but will not change its value for the actual
  398.      height of the screen.  Knowing the correct actual size may be
  399.      necessary for correct cursor positioning.
  400.  
  401.      If LINES is different from what it was previously, then the
  402.      entire screen is cleared and redisplayed using the new size.
  403.  
  404.      This function returns `nil'.
  405.  
  406.  * Function: set-screen-width COLUMNS &optional NOT-ACTUAL-SIZE
  407.      This function declares that the terminal can display COLUMNS
  408.      columns.  The details are as in `set-screen-height'.
  409.  
  410.  * Variable: no-redraw-on-reenter
  411.      This variable controls whether Emacs redraws the entire screen
  412.      after it has been suspended and resumed.  Non-`nil' means yes,
  413.      `nil' means no.  On most terminals, it is necessary to redraw. 
  414.      Not redrawing is useful if the terminal can remember and restore
  415.      the Emacs screen contents.
  416.  
  417.  * Variable: inverse-video
  418.      This variable controls whether Emacs uses inverse video for all
  419.      text on the screen.  Non-`nil' means yes, `nil' means no.  The
  420.      default is `nil'.
  421.  
  422.  * User Option: mode-line-inverse-video
  423.      This variable controls the use of inverse video for mode lines. 
  424.      If it is non-`nil', then mode lines are displayed in inverse
  425.      video (or another suitable display mode).  Otherwise, mode lines
  426.      are displayed normal, just like the rest of the screen.  The
  427.      default is `t'.
  428.  
  429.  
  430. 
  431. File: elisp,  Node: Truncation,  Next: The Echo Area,  Prev: Screen Attributes,  Up: Emacs Display
  432.  
  433. Truncation
  434. ==========
  435.  
  436.    When a line of text extends beyond the right edge of a window, the
  437. line can either be truncated or continued on the next line.  When a
  438. line is truncated, this is shown with a `$' in the rightmost column
  439. of the window.  When a line is continued or "wrapped" onto the next
  440. line, this is shown with a `\' on the rightmost column of the window.
  441. The additional screen lines used to display a long text line are
  442. called "continuation" lines.  (Note that wrapped lines are not
  443. filled; filling has nothing to do with truncation and continuation. 
  444. *Note Filling::.)
  445.  
  446.  * User Option: truncate-lines
  447.      This buffer-local variable controls how Emacs displays lines
  448.      that extend beyond the right edge of the window.  If it is
  449.      non-`nil', then Emacs does not display continuation lines; but
  450.      rather each line of text will take exactly one screen line, and
  451.      a dollar sign will be shown at the edge of any line that extends
  452.      to or beyond the edge of the window.  The default is `nil'.
  453.  
  454.      If the variable `truncate-partial-width-windows' is non-`nil',
  455.      then truncation is used for windows that are not the full width
  456.      of the screen, regardless of the value of `truncate-lines'.
  457.  
  458.  * Variable: default-truncate-lines
  459.      This variable is the default value for `truncate-lines' in
  460.      buffers that do not override it.
  461.  
  462.  * User Option: truncate-partial-width-windows
  463.      This variable determines how lines that are too wide to fit on
  464.      the screen are displayed in side-by-side windows (*note
  465.      Splitting Windows::.).  If it is non-`nil', then wide lines are
  466.      truncated (with a `$' at the end of the line); otherwise they
  467.      are wrapped (with a `\' at the end of the line).
  468.  
  469.  
  470. 
  471. File: elisp,  Node: The Echo Area,  Next: Selective Display,  Prev: Truncation,  Up: Emacs Display
  472.  
  473. The Echo Area
  474. =============
  475.  
  476.    The "echo area" is used for displaying messages made with the
  477. `message' primitive, and for echoing keystrokes.  It is not the same
  478. as the minibuffer, despite the fact that the minibuffer appears (when
  479. active) in the same place on the screen as the echo area.  The ``GNU
  480. Emacs Manual'' specifies the rules for resolving conflicts between
  481. the echo area and the minibuffer for use of that screen space (*note
  482. : (emacs)Minibuffer.).
  483.  
  484.    You can write output in the echo area by using the Lisp printing
  485. funtions with `t' as the stream (*note Output Functions::.), or as
  486. follows:
  487.  
  488.  * Function: message STRING &rest ARGUMENTS
  489.      This function prints a one-line message in the echo area.  The
  490.      argument STRING is similar to a C language `printf' control
  491.      string.  See `format' in *Note String Conversion::, for the
  492.      details on the conversion specifications.  `message' returns the
  493.      constructed string.
  494.  
  495.           (message "Minibuffer depth is %d." (minibuffer-depth))
  496.           => "Minibuffer depth is 0."
  497.           
  498.           ---------- Echo Area ----------
  499.           Minibuffer depth is 0.
  500.           ---------- Echo Area ----------
  501.  
  502.  * Variable: cursor-in-echo-area
  503.      This variable controls where the cursor is positioned when a
  504.      message is displayed in the echo area.  If it is non-`nil', then
  505.      the cursor appears at the end of the message.  Otherwise, the
  506.      cursor appears at point--not in the echo area at all.
  507.  
  508.      The value is normally `nil' except when bound to `t' for brief
  509.      periods of time.
  510.  
  511.  
  512. 
  513. File: elisp,  Node: Selective Display,  Next: Overlay Arrow,  Prev: The Echo Area,  Up: Emacs Display
  514.  
  515. Selective Display
  516. =================
  517.  
  518.    "Selective display" is a class of minor modes in which specially
  519. marked lines do not appear on the screen, or in which highly indented
  520. lines do not appear.
  521.  
  522.    The first variant, explicit selective display, is designed for use
  523. in a Lisp program.  The program controls which lines are hidden by
  524. altering the text.  Outline mode uses this variant.  In the second
  525. variant, the choice of lines to hide is made automatically based on
  526. indentation.  This variant is designed as a user-level feature.
  527.  
  528.    The way you control explicit selective display is by replacing a
  529. newline (control-j) with a control-m.  The text which was formerly a
  530. line following that newline is now invisible.  Strictly speaking, it
  531. is no longer a separate line, since only newlines can separate lines;
  532. it is now part of the previous line.
  533.  
  534.    On its own, selective display does not affect editing commands. 
  535. For example, `C-f' (`forward-char') moves point unhesitatingly into
  536. invisible space.  However, the replacement of newline characters with
  537. carriage return characters affects some editing commands.  For
  538. example, `next-line' skips invisible lines, since it searches only
  539. for newlines.  Modes that use selective display can also define
  540. commands that take account of the newlines, or which make parts of
  541. the text visible or invisible.
  542.  
  543.    When you write a selectively displayed buffer into a file, all the
  544. control-m's are replaced by their original newlines.  This means that
  545. when you next read in the file, it looks OK, with nothing invisible. 
  546. Selective display is an effect that is seen only in Emacs.
  547.  
  548.  * Variable: selective-display
  549.      This buffer-local variable enables selective display.  This
  550.      means that lines, or portions of lines, may be made invisible.
  551.  
  552.         * If the value of `selective-display' is `t', then any
  553.           portion of a line that follows a control-m will not be
  554.           displayed.
  555.  
  556.         * If the value of `selective-display' is a positive integer,
  557.           then lines that start with more than `selective-display'
  558.           columns of indentation will not be displayed.
  559.  
  560.      When some portion of a buffer is invisible, the vertical
  561.      movement commands operate as if that portion did not exist,
  562.      allowing a single `next-line' command to skip any number of
  563.      invisible lines.  However, character movement commands (such as
  564.      `forward-char') will not skip the invisible portion, and it is
  565.      possible (if tricky) to insert or delete parts of an invisible
  566.      portion.
  567.  
  568.      In the examples below, what is shown is the *display* of the
  569.      buffer `foo', which changes with the value of
  570.      `selective-display'.  The *contents* of the buffer do not change.
  571.  
  572.           (setq selective-display nil)
  573.                => nil
  574.           
  575.           ---------- Buffer: foo ----------
  576.           1 on this column
  577.            2on this column
  578.             3n this column
  579.             3n this column
  580.            2on this column
  581.           1 on this column
  582.           ---------- Buffer: foo ----------
  583.           
  584.           (setq selective-display 2)
  585.                => 2
  586.           
  587.           ---------- Buffer: foo ----------
  588.           1 on this column
  589.            2on this column
  590.            2on this column
  591.           1 on this column
  592.           ---------- Buffer: foo ----------
  593.  
  594.  * Variable: selective-display-ellipses
  595.      If this buffer-local variable is non-`nil', then Emacs displays
  596.      `...' at the end of a line that is followed by invisible text. 
  597.      This example is a continuation of the previous one.
  598.  
  599.           (setq selective-display-ellipses t)
  600.                => t
  601.           
  602.           ---------- Buffer: foo ----------
  603.           1 on this column
  604.            2on this column ...
  605.            2on this column
  606.           1 on this column
  607.           ---------- Buffer: foo ----------
  608.  
  609.  
  610. 
  611. File: elisp,  Node: Overlay Arrow,  Next: Temporary Displays,  Prev: Selective Display,  Up: Emacs Display
  612.  
  613. Overlay Arrow
  614. =============
  615.  
  616.    The "overlay arrow" is useful for directing the user's attention
  617. to a particular line in a buffer.  For example, in the modes used for
  618. interface to debuggers, the overlay arrow indicates the current line
  619. of code about to be executed.
  620.  
  621.  * Variable: overlay-arrow-string
  622.      This variable holds the string to display as an arrow, or `nil'
  623.      if the arrow feature is not in use.
  624.  
  625.  * Variable: overlay-arrow-position
  626.      This variable holds a marker which indicates where to display
  627.      the arrow.  It should point at the beginning of a line.  The
  628.      arrow text will be displayed at the beginning of that line,
  629.      overlaying any text that would otherwise appear.  Since the
  630.      arrow is usually short, and the line usually begins with
  631.      indentation, normally nothing significant is overwritten.
  632.  
  633.      The overlay string is displayed only in the buffer which this
  634.      marker points into.  Thus, only one buffer can have an overlay
  635.      arrow at any given time.
  636.  
  637.  
  638. 
  639. File: elisp,  Node: Temporary Displays,  Next: Waiting,  Prev: Overlay Arrow,  Up: Emacs Display
  640.  
  641. Temporary Displays
  642. ==================
  643.  
  644.    Temporary displays are used by commands to put output into a
  645. buffer and then present it to the user for perusal rather than for
  646. editing.  Many of the help commands use this feature.
  647.  
  648.  * Special Form: with-output-to-temp-buffer BUFFER-NAME FORMS...
  649.      This function executes FORMS while arranging to insert any
  650.      output they print into the buffer named BUFFER-NAME.  The buffer
  651.      is then shown in some window for viewing, displayed but not
  652.      selected.
  653.  
  654.      The buffer is named by the string BUFFER-NAME, and it need not
  655.      already exist.  The argument BUFFER-NAME must be a string, not a
  656.      buffer.  The buffer is erased initially (with no questions
  657.      asked), and it is marked as unmodified after
  658.      `with-output-to-temp-buffer' exits.
  659.  
  660.      `with-output-to-temp-buffer' first binds `standard-output' to
  661.      the buffer, then it evaluates the forms in FORMS.  With
  662.      `standard-output' rebound, any output directed there will
  663.      naturally be inserted into that buffer.  Only Lisp output
  664.      directed to the stream `standard-output' is affected; screen
  665.      display and messages in the echo area, although output in the
  666.      general sense of the word, are not affected.  *Note Output
  667.      Functions::.
  668.  
  669.      The value of the last form in FORMS is returned.
  670.  
  671.           ---------- Buffer: foo ----------
  672.            This is the contents of foo.
  673.           ---------- Buffer: foo ----------
  674.           
  675.           (with-output-to-temp-buffer "foo"
  676.               (print 20)
  677.               (print standard-output))
  678.           => #<buffer foo>
  679.           
  680.           ---------- Buffer: foo ----------
  681.           20
  682.           
  683.           #<buffer foo>
  684.           
  685.           ---------- Buffer: foo ----------
  686.  
  687.  * Variable: temp-buffer-show-hook
  688.      The value of the `temp-buffer-show-hook' variable is either
  689.      `nil' or is called as a function to display a help buffer.  This
  690.      variable is used by `with-output-to-temp-buffer'.
  691.  
  692.  * Function: momentary-string-display STRING POSITION &optional CHAR
  693.           MESSAGE
  694.      This function momentarily displays STRING in the current buffer
  695.      at POSITION (which is a character offset from the beginning of
  696.      the buffer).  The display remains until the next character is
  697.      typed.
  698.  
  699.      If the next character the user types is CHAR, Emacs ignores it. 
  700.      Otherwise, that character remains buffered for subsequent use as
  701.      input.  Thus, typing CHAR will simply remove the string from the
  702.      display, while typing (say) `C-f' will remove the string from
  703.      the display and later (presumably) move point forward.  The
  704.      argument CHAR is a space by default.
  705.  
  706.      The result of `momentary-string-display' is not useful.
  707.  
  708.      If MESSAGE is non-`nil', it is displayed in the echo area.  If
  709.      it is `nil', then instructions to type CHAR are displayed there,
  710.      e.g., `Type RET to continue editing'.
  711.  
  712.      In this example, point is initially located at the beginning of
  713.      the second line:
  714.  
  715.           ---------- Buffer: foo ----------
  716.           This is the contents of foo.
  717.           -!-This is the contents of foo.
  718.           ---------- Buffer: foo ----------
  719.           
  720.           (momentary-string-display
  721.              "******* Important Message! *******" (point) ?\r
  722.              "Type RET when done reading")
  723.           => t
  724.           
  725.           ---------- Buffer: foo ----------
  726.           This is the contents of foo.
  727.           ******* Important Message! *******This is the contents of foo.
  728.           ---------- Buffer: foo ----------
  729.           
  730.           ---------- Echo Area ----------
  731.           Type RET when done reading
  732.  
  733.      This function works by actually changing the text in the buffer.
  734.      As a result, if you later undo in this buffer, you will see the
  735.      message come and go.
  736.  
  737.  
  738. 
  739. File: elisp,  Node: Waiting,  Next: Blinking,  Prev: Temporary Displays,  Up: Emacs Display
  740.  
  741. Waiting for Elapsed Time or Input
  742. =================================
  743.  
  744.    The waiting commands are designed to make Emacs wait for a certain
  745. amount of time to pass or until there is input.  For example, you may
  746. wish to pause in the middle of a computation to allow the user time
  747. to view the display.  `sit-for' performs a pause with an update of
  748. screen, while `sleep-for' performs a pause without updating the screen.
  749.  
  750.  * Function: sit-for SECONDS
  751.      This function performs redisplay (provided there is no pending
  752.      input from the user), then waits SECONDS seconds, or until input
  753.      is available.  The result is `t' if `sit-for' waited the full
  754.      time with no input arriving (see `input-pending-p' in *Note
  755.      Keyboard Input::).  Otherwise, `nil' is returned.
  756.  
  757.      Redisplay is always preempted if input arrives, and does not
  758.      happen at all if input is available before it starts.  Thus,
  759.      there is no way to force screen updating if there is pending
  760.      input; however, if there is no input pending, you can force an
  761.      update with no delay by using `(sit-for 0)'.
  762.  
  763.      The purpose of `sit-for' to give the user time to read text that
  764.      you display.
  765.  
  766.  * Function: sleep-for SECONDS
  767.      This function simply pauses for SECONDS seconds without updating
  768.      the display.  It pays no attention to available input.  It
  769.      returns `nil'.
  770.  
  771.      Use `sleep-for' when you wish to guarantee a delay.
  772.  
  773.  
  774. 
  775. File: elisp,  Node: Blinking,  Next: Control Char Display,  Prev: Waiting,  Up: Emacs Display
  776.  
  777. Blinking
  778. ========
  779.  
  780.    This section describes the mechanism by which Emacs shows a
  781. matching open parenthesis when the user inserts a close parenthesis.
  782.  
  783.  * Variable: blink-paren-hook
  784.      The value of this variable should be a function (of no
  785.      arguments) to be called whenever a char with close parenthesis
  786.      syntax is inserted.  The value of `blink-paren-hook' may be
  787.      `nil', in which case nothing is done.
  788.  
  789.           *Note:* in version 18, this function is named
  790.           `blink-paren-hook', but since it is not called with the
  791.           standard convention for hooks, it is being renamed to
  792.           `blink-paren-function' in version 19.
  793.  
  794.  * Variable: blink-matching-paren
  795.      If this variable is `nil', then `blink-matching-open' does
  796.      nothing.
  797.  
  798.  * Variable: blink-matching-paren-distance
  799.      This variable specifies the maximum distance to scan for a
  800.      matching parenthesis before giving up.
  801.  
  802.  * Function: blink-matching-open
  803.      This function is the default value of `blink-paren-hook'.  It
  804.      assumes that point follows a character with close parenthesis
  805.      syntax and moves the cursor momentarily to the matching opening
  806.      character.  If that character is not already on the screen, then
  807.      its context is shown by displaying it in the echo area.  To
  808.      avoid long delays, this function does not search farther than
  809.      `blink-matching-paren-distance' characters.
  810.  
  811.      Here is an example of calling this function explicitly.
  812.  
  813.           (defun interactive-blink-matching-open ()
  814.             "Indicate momentarily the start of sexp before point."
  815.             (interactive)
  816.             (let ((blink-matching-paren-distance (buffer-size))
  817.                   (blink-matching-paren t))
  818.               (blink-matching-open)))
  819.  
  820.  
  821. 
  822. File: elisp,  Node: Control Char Display,  Next: Beeping,  Prev: Blinking,  Up: Emacs Display
  823.  
  824. Display of Control Characters
  825. =============================
  826.  
  827.    These variables affect the way certain characters are displayed on
  828. the screen.  Since they change the number of columns the characters
  829. occupy, they also affect the indentation functions.
  830.  
  831.  * User Option: ctl-arrow
  832.      This buffer-local variable controls how control characters are
  833.      displayed.  If it is non-`nil', they are displayed as an uparrow
  834.      followed by the character: `^A'.  If it is `nil', they are
  835.      displayed as a backslash followed by three octal digits: `\001'.
  836.  
  837.  * Variable: default-ctl-arrow
  838.      The value of this variable is the default value for `ctl-arrow'
  839.      in buffers that do not override it.  This is the same as
  840.      `(default-value 'ctl-arrow)' (*note Default Value::.).
  841.  
  842.  * User Option: tab-width
  843.      The value of this variable is the spacing between tab stops used
  844.      for displaying tab characters in Emacs buffers.  The default is
  845.      8.  Note that this feature is completely independent from the
  846.      user-settable tab stops used by the command `tab-to-tab-stop'. 
  847.      *Note Indent Tabs::.
  848.  
  849.  
  850. 
  851. File: elisp,  Node: Beeping,  Next: Window Systems,  Prev: Control Char Display,  Up: Emacs Display
  852.  
  853. Beeping
  854. =======
  855.  
  856.    You can make Emacs ring a bell (or blink the screen) to attract
  857. the user's attention.  Be conservative about how often you do this;
  858. frequent bells can become irritating.  Also be careful not to use
  859. beeping alone when signaling an error is appropriate.  (*Note
  860. Errors::.)
  861.  
  862.  * Function: ding &optional DONT-TERMINATE
  863.      This function beeps, or flashes the screen (see `visible-bell'
  864.      below).  It also terminates any keyboard macro currently
  865.      executing unless DONT-TERMINATE is non-`nil'.
  866.  
  867.  * Function: beep &optional DONT-TERMINATE
  868.      This is a synonym for `ding'.
  869.  
  870.  * Variable: visible-bell
  871.      This variable determines whether Emacs will try to flash the
  872.      screen to represent a bell.  Non-`nil' means yes, `nil' means
  873.      no.  This is effective only if the termcap entry for the
  874.      terminal in use has the visible bell flag (`vb') set.
  875.  
  876.  
  877. 
  878. File: elisp,  Node: Window Systems,  Prev: Beeping,  Up: Emacs Display
  879.  
  880. Window Systems
  881. ==============
  882.  
  883.    Emacs works with several window systems, most notably X Windows. 
  884. Note that both Emacs and the X Window System use the term "window",
  885. but use it differently.  The entire Emacs screen is a single window
  886. as far as X Windows is concerned; the individual Emacs windows are
  887. not known to X Windows at all.
  888.  
  889.  * Variable: window-system
  890.      This variable tells Lisp programs what window system Emacs is
  891.      running under.  Its value should be a symbol such as `x' (if
  892.      Emacs is running under X Windows) or `nil' (if Emacs is running
  893.      on an ordinary terminal).
  894.  
  895.  * Variable: window-system-version
  896.      This variable distinguishes between different versions of the X
  897.      Window System.  Its value is 10 or 11 when using X Windows;
  898.      `nil' otherwise.
  899.  
  900.  * Variable: window-setup-hook
  901.      The value of the `window-setup-hook' variable is either `nil' or
  902.      a function for Emacs to call after loading your `.emacs' file
  903.      and the default initialization file (if any), after loading
  904.      terminal-specific Lisp code, and after calling
  905.      `term-setup-hook'.  `window-setup-hook' is called with no
  906.      arguments.
  907.  
  908.      This hook is used for internal purposes: setting up
  909.      communication with the window system, and creating the initial
  910.      window.  Users should not interfere with it.
  911.  
  912.  
  913. 
  914. File: elisp,  Node: Tips,  Next: GNU Emacs Internals,  Prev: Emacs Display,  Up: Top
  915.  
  916. Tips and Standards
  917. ******************
  918.  
  919.    This chapter describes no additional features of Emacs Lisp. 
  920. Instead it gives advice on making effective use of the features
  921. described in the previous chapters.
  922.  
  923. * Menu:
  924.  
  925. * Style Tips::                Writing clean and robust programs.
  926. * Compilation Tips::          Making compiled code run fast.
  927. * Documentation Tips::        Writing readable documentation strings.
  928.  
  929.  
  930. 
  931. File: elisp,  Node: Style Tips,  Next: Compilation Tips,  Prev: Tips,  Up: Tips
  932.  
  933. Writing Clean Lisp Programs
  934. ===========================
  935.  
  936.    Here are some tips for avoiding common errors in writing Lisp code
  937. intended for widespread use:
  938.  
  939.    * Since all global variables share the same name space, and all
  940.      functions share another name space, you should choose a short
  941.      word to distinguish your program from other Lisp programs.  Then
  942.      take care to begin the names of all global variables, constants,
  943.      and functions with the chosen prefix.  This helps avoid name
  944.      conflicts.
  945.  
  946.      This recommendation applies even to names for traditional Lisp
  947.      primitives that are not primitives in Emacs Lisp--even to `cadr'.
  948.      Believe it or not, there is more than one plausible way to
  949.      define `cadr'.  Play it safe; append your name prefix to produce
  950.      a name like `foo-cadr' or `mylib-cadr' instead.
  951.  
  952.      If one prefix is insufficient, your package may use two or three
  953.      alternative common prefixes, so long as they make sense.
  954.  
  955.    * It is often useful to put a call to `provide' in each separate
  956.      library program, at least if there is more than one entry point
  957.      to the program.
  958.  
  959.    * If one file FOO uses a macro defined in another file BAR, FOO
  960.      should contain `(require 'BAR)' before the first use of the
  961.      macro.  (And BAR should contain `(provide 'BAR)', to make the
  962.      `require' work.)  This will cause BAR to be loaded when you
  963.      byte-compile FOO.  Otherwise, you risk compiling FOO without the
  964.      necessary macro loaded, and that would produce compiled code
  965.      that won't work right.  *Note Compiling Macros::.
  966.  
  967.    * If you define a major mode, make sure to run a hook variable
  968.      using `run-hooks', just as the existing major modes do.  *Note
  969.      Hooks::.
  970.  
  971.    * Please do not define `C-c LETTER' as a key.  These sequences are
  972.      reserved for users; they are the *only* sequences reserved for
  973.      users, so we cannot do without them.
  974.  
  975.      Everything in Emacs that used to define such sequences has been
  976.      changed, which was a lot of work.  Abandoning this convention
  977.      would waste that work and inconvenience the users.
  978.  
  979.    * It is a bad idea to define aliases for the Emacs primitives. 
  980.      Use the standard names instead.
  981.  
  982.    * Redefining an Emacs primitive is an even worse idea.  It may do
  983.      the right thing for a particular program, but  there is no
  984.      telling what other programs might break as a result.
  985.  
  986.    * If a file does replace any of the functions or library programs
  987.      of standard Emacs, prominent comments at the beginning of the
  988.      file should say which functions are replaced, and how the
  989.      behavior of the replacements differs from that of the originals.
  990.  
  991.    * If a file requires certain standard library programs to be
  992.      loaded beforehand, then the comments at the beginning of the
  993.      file should say so.
  994.  
  995.    * Don't use `next-line' or `previous-line' in programs; nearly
  996.      always, `forward-line' is more convenient as well as more
  997.      predictable and robust.  *Note Text Lines::.
  998.  
  999.    * Don't use functions that set the mark in your Lisp code (unless
  1000.      you are writing a command to set the mark).  The mark is a
  1001.      user-level feature, so it is incorrect to change the mark except
  1002.      to supply a value for the user's benefit.  *Note The Mark::.
  1003.  
  1004.      In particular, don't use these functions:
  1005.  
  1006.         * `beginning-of-buffer', `end-of-buffer'
  1007.  
  1008.         * `replace-string', `replace-regexp'
  1009.  
  1010.      If you just want to move point, or replace a certain string,
  1011.      without any of the other features intended for interactive
  1012.      users, you can replace these functions with one or two lines of
  1013.      simple Lisp code.
  1014.  
  1015.    * The recommended way to print a message in the echo area is with
  1016.      the `message' function, not `princ'.  *Note The Echo Area::.
  1017.  
  1018.    * When you encounter an error condition, call the function `error'
  1019.      (or `signal').  The function `error' does not return.  *Note
  1020.      Signaling Errors::.
  1021.  
  1022.      Do not use `message', `throw', `sleep-for', or `beep' to report
  1023.      errors.
  1024.  
  1025.    * Avoid using recursive edits.  Instead, do what the Rmail `w'
  1026.      command does: use a new local keymap that contains one command
  1027.      defined to switch back to the old local keymap.  Or do what the
  1028.      `edit-options' command does: switch to another buffer and let
  1029.      the user switch back at will.  *Note Recursive Editing::.
  1030.  
  1031.    * In some other systems there is a convention of choosing variable
  1032.      names that begin and end with `*'.  We don't use that convention
  1033.      in Emacs Lisp, so please don't use it in your library.  The
  1034.      users will find Emacs more coherent if all libraries use the
  1035.      same conventions.
  1036.  
  1037.    * Indent each function with `C-M-q' (`indent-sexp') using the
  1038.      default indentation parameters.
  1039.  
  1040.    * Don't make a habit of putting close-parentheses on lines by
  1041.      themselves; Lisp programmers find this disconcerting.  Once in a
  1042.      while, when there is a sequence of many consecutive
  1043.      close-parentheses, it may make sense to split them in one or two
  1044.      significant places.
  1045.  
  1046.    * Please put a copyright notice on the file if you give copies to
  1047.      anyone.  Use the same lines that appear at the top of the Lisp
  1048.      files in Emacs itself.  If you have not signed papers to assign
  1049.      the copyright to the Foundation, then place your name in the
  1050.      copyright notice in place of the Foundation's name.
  1051.  
  1052.  
  1053. 
  1054. File: elisp,  Node: Compilation Tips,  Next: Documentation Tips,  Prev: Style Tips,  Up: Tips
  1055.  
  1056. Tips for Making Compiled Code Fast
  1057. ==================================
  1058.  
  1059.    Here are ways of improving the execution speed of byte-compiled
  1060. lisp programs.
  1061.  
  1062.    * Use iteration rather than recursion whenever possible.  Function
  1063.      calls are slow in Emacs Lisp even when a compiled function is
  1064.      calling another compiled function.
  1065.  
  1066.    * Using the primitive list-searching functions `memq', `assq' or
  1067.      `assoc' is even faster than explicit iteration.  It may be worth
  1068.      rearranging a data structure so that one of these primitive
  1069.      search functions can be used.
  1070.  
  1071.      For example, if you want to search a list of strings for a
  1072.      string equal to a given one, you can use an explicit loop:
  1073.  
  1074.           (let ((tail list))
  1075.             (while (and tail (not (string= string (car tail))))
  1076.               (setq tail (cdr tail))))
  1077.  
  1078.      However, if you use a list of elements of the form `(STRING)', 
  1079.      such as `(("foo") ("#&") ("bar"))', then you can search it with
  1080.      `assoc':
  1081.  
  1082.           (assoc string list)
  1083.  
  1084.      The latter runs entirely in C code, so it is much faster.
  1085.  
  1086.    * Certain built-in functions are handled specially by the byte
  1087.      compiler avoiding the need for an ordinary function call.  It is
  1088.      a good idea to use these functions rather than alternatives.  To
  1089.      see whether a function is handled specially by the compiler,
  1090.      examine its `byte-compile' property.  If the property is
  1091.      non-`nil', then the function is handled specially.
  1092.  
  1093.      For example, the following input will show you that `aref' is
  1094.      compiled specially (*note Array Functions::.) while `elt' is not
  1095.      (*note Sequence Functions::.):
  1096.  
  1097.           (get 'aref 'byte-compile)
  1098.                => byte-compile-two-args
  1099.           
  1100.           (get 'elt 'byte-compile)
  1101.                => nil
  1102.  
  1103.    * Often macros result in faster execution than functions.  For
  1104.      example, the following macro and the following function have the
  1105.      same effect when called, but code using the macro runs faster
  1106.      because it avoids an extra call to a user-defined function:
  1107.  
  1108.           (defmacro fast-cadr (x) (list 'car (list 'cdr x)))
  1109.           
  1110.           (defun slow-cadr (x) (car (cdr x)))
  1111.  
  1112.  
  1113. 
  1114. File: elisp,  Node: Documentation Tips,  Prev: Compilation Tips,  Up: Tips
  1115.  
  1116. Tips for Documentation Strings
  1117. ==============================
  1118.  
  1119.    Here are some tips for the writing of documentation strings.
  1120.  
  1121.    * Every command, function or variable intended for users to know
  1122.      about should have a documentation string.
  1123.  
  1124.    * An internal subroutine of a Lisp program need not have a
  1125.      documentation string, and you can save space by using a comment
  1126.      instead.
  1127.  
  1128.    * The first line of the documentation string should consist of one
  1129.      or two complete sentences which stand on their own as a summary.
  1130.      In particular, start the line with a capital letter and end with
  1131.      a period.
  1132.  
  1133.      The documentation string can have additional lines which expand
  1134.      on the details of how to use the function or variable.  The
  1135.      additional lines should be made up of complete sentences also,
  1136.      but they may be filled if that looks good.
  1137.  
  1138.    * Do not start or end a documentation string with whitespace.
  1139.  
  1140.    * Format the documentation string so that it fits in an Emacs
  1141.      window on an 80 column screen.  It is a good idea for most lines
  1142.      to be no wider than 60 characters.  The first line can be wider
  1143.      if necessary to fit the  information that ought to be there.
  1144.  
  1145.      However, rather than simply filling the entire documentation
  1146.      string, you can make it much more readable by choosing line
  1147.      breaks with care.  Use blank lines between topics if the
  1148.      documentation string is long.
  1149.  
  1150.    * *Do not* indent subsequent lines of a documentation string so
  1151.      that the text is lined up in the source code with the text of
  1152.      the first line.  This looks nice in the source code, but looks
  1153.      bizarre when users view the documentation.  Remember that the
  1154.      indentation before the starting double-quote is not part of the
  1155.      string!
  1156.  
  1157.    * A variable's documentation string should start with `*' if the
  1158.      variable is one that users would want to set interactively
  1159.      often.  If the value is a long list, or a function, or if the
  1160.      variable would only be set in init files, then don't start the
  1161.      documentation string with `*'.  *Note Defining Variables::.
  1162.  
  1163.    * The documentation string for a variable that is a yes-or-no flag
  1164.      should start with words such as "Non-nil means...", to make it
  1165.      clear both that the variable only has two meaningfully distinct
  1166.      values and which value means "yes".
  1167.  
  1168.    * When a function's documentation string mentions the value of an
  1169.      argument of the function, use the argument name in capital
  1170.      letters as if it were a name for that value.  Thus, the
  1171.      documentation string of the function `/' refers to its second
  1172.      argument as `DIVISOR'.
  1173.  
  1174.      Also use all caps for meta-syntactic variables, such as when you
  1175.      show the decomposition of a list or vector into subunits, some
  1176.      of which may be variable.
  1177.  
  1178.    * When a documentation string refers to a Lisp symbol, write it as
  1179.      it would be printed (which usually means in lower case), with
  1180.      single-quotes around it.  For example: ``lambda''.  There are
  1181.      two exceptions: write `t' and `nil' without single-quotes.
  1182.  
  1183.    * Don't write key sequences directly in documentation strings. 
  1184.      Instead, use the `\\[...]' construct to stand for them.  For
  1185.      example, instead of writing `C-f', write `\\[forward-char]'. 
  1186.      When the documentation string is printed, Emacs will substitute
  1187.      whatever key is currently bound to `forward-char'.  This will
  1188.      usually be `C-f', but if the user has moved key bindings, it
  1189.      will be the correct key for that user.  *Note Keys in
  1190.      Documentation::.
  1191.  
  1192.    * In documentation strings for a major mode, you will want to
  1193.      refer to the key bindings of that mode's local map, rather than
  1194.      global ones.  Therefore, use the construct `\\<...>' once in the
  1195.      documentation string to specify which key map to use.  Do this
  1196.      before the first use of `\\[...]'.  The text inside the
  1197.      `\\<...>' should be the name of the variable containing the
  1198.      local keymap for the major mode.
  1199.  
  1200.  
  1201. 
  1202. File: elisp,  Node: GNU Emacs Internals,  Next: Standard Errors,  Prev: Tips,  Up: Top
  1203.  
  1204. GNU Emacs Internals
  1205. *******************
  1206.  
  1207.    This chapter describes how the runnable Emacs executable is dumped
  1208. with the preloaded Lisp libraries in it, how storage is allocated,
  1209. and some internal aspects of GNU Emacs that may be of interest to C
  1210. programmers.
  1211.  
  1212. * Menu:
  1213.  
  1214. * Building Emacs::      How to preload Lisp libraries into Emacs.
  1215. * Pure Storage::        A kludge to make preloaded Lisp functions sharable.
  1216. * Garbage Collection::  Reclaiming space for Lisp objects no longer used.
  1217. * Object Internals::    Data formats of buffers, windows, processes.
  1218. * Writing Emacs Primitives::   Writing C code for Emacs.
  1219.  
  1220.